export class PolyLine {
    constructor({ el, FarEl, color }) {
        console.log("this.FarEl", this.FarEl);
        this.el = el;
        this.FarEl = FarEl;
        this.canvanWidth = this.FarEl.offsetWidth;
        this.canvanHeight = this.FarEl.offsetHeight;
        this.ctx = this.el.getContext('2d');
        this.color = color;
        if (this.FarEl) {
            this.render();
        }

    }

    render() {
        console.log("this.canvanWidth, this.canvanHeight", this.canvanWidth, this.canvanHeight);
        const ctx = this.ctx;
        ctx.save();
        ctx.strokeStyle = this.color;
        ctx.lineWidth = 2;
        ctx.rect(1, 1, this.canvanWidth, this.canvanHeight);
        ctx.stroke();
        // ctx.clearRect(angleLength, 0, canvas.width - angleLength * 2, canvas.height);
        // ctx.clearRect(0, angleLength, canvas.width, canvas.height - angleLength * 2);
        ctx.restore();
    }


}